const Websocket = require('ws');

const wss = new Websocket.Server(
    {port : 13998}
);

const msg = {
    HEAD : {
        tag : "MESG",
        version : 65537,
        record_type : "MESG",
        record_subtype : "RECEIVE",
        flow : 0,
        record_num : 0,
        expand_num : 0,
        nonce: ''
    },
    RECORD : [
        "normal",
        "special"
    ],
    EXPAND : [
        "nothing"
    ]
}

let jsonString = JSON.stringify(msg);

wss.on('connection', function connection(ws){
    // ws.on('message', function incoming(message) {
    //     console.log(`recv: ${message}`);
    // });
    ws.send(jsonString);
});

